package Demo1;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);


        while (scanner.hasNext()){
            String oper = scanner.next();
            if (oper.equals("arr")){
                int index = scanner.nextInt();
                try{
                    int [] arr = new int[5];
                    int ret = arr[index];
                }catch(Exception e){
                    System.out.println(e);
                }
            }else if (oper.equals("null")){
                try{
                    String a = null;
                    int len = a.length();
                }catch(Exception e){
                    System.out.println(e);
                }

            }else if (oper.equals("cast")){
                try{
                    String b = "abcd";
                    Integer a = Integer.parseInt(b);
                }catch (Exception e){
                    System.out.println(e);
                }
            }else if (oper.equals("num")){
                try{
                    String c = scanner.next();
                    Integer a = Integer.parseInt(c);
                }catch (Exception e){
                    System.out.println(e);
                }
            }else{
                System.exit(0);
            }
        }
    }
}
